namespace Cos.Core.NHibernate
{
    using System;
    using System.Collections.Generic;
    using Cos.Core.Model.Template;

    public class PartDataModel
    {
        public PartDataModel() {}

        public virtual string CustomValidator { get; set; }

        public virtual int DataTypeId { get; set; }

        public virtual bool IsMultiCulture { get; set; }

        public virtual bool IsRequired { get; set; }

        public virtual int? MaxLength { get; set; }

        public virtual string MaxValue { get; set; }

        public virtual int? MinLength { get; set; }

        public virtual string MinValue { get; set; }

        public virtual int Id { get; set; }

        public virtual string PartName { get; set; }

        public virtual int PartOrder { get; set; }

        public virtual int? PresentationHeight { get; set; }

        public virtual int? PresentationWidth { get; set; }

        public virtual int TemplateId { get; set; }

        public virtual int? ThumbnailHeight { get; set; }

        public virtual int? ThumbnailWidth { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as PartDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }
    }
}